 {extend name="layout:base" /}{block name="content"}

 <?php
$global = 0;
if($LoginUserInfo['Group']['id']==1)
{
$global = 1;
}
 ?>
 <link rel="stylesheet" type="text/css" href="/static/My97DatePicker/skin/WdatePicker.css" />
     <script charset="utf-8" src="/static/My97DatePicker/WdatePicker.js"></script>
<style type="text/css">
  .yg_inp>input{margin-bottom: 10px;}
#zc_detail table{margin:10px;}
#zc_detail table tr td{
	border: 1px solid #ddd;
	height:40px;
	line-height:40px;
	padding-left:5px;
	padding-right:5px;
} 
.ordertable input {width:90%;}
.policeLable{padding:2px 4px;margin-left:4px;}
#taskDate .taskDateItem{
	width:100%;height:40px;line-height:40px;margin:4px 0px;
}
#taskDate .taskDateItem .taskDateItemLeft{width:10%;float:left;}
#taskDate .taskDateItem .taskDateItemRight1{width:70%;float:left;border:1px solid #139667;height: 42px;}
#taskDate .taskDateItem .taskDateItemRight2{width:20%;float:right;}
#taskDate .taskDateItem .opUsers img{width:22px;margin-left:5px;}

#taskDate .taskDateItem .itemUser{padding: 4px 6px;background:#139667;margin-left:4px;color:white;}
#taskDate .taskDateItem .clear{clear:both;width:0px;height:0px;overflow:hidden;}
#taskDate .taskDateItem .jia,#taskDate .taskDateItem .jian{font-size:30px;cursor:pointer;font-weight:800;margin-left:5px;}

</style>

<!--引入JS-->
<script type="text/javascript" src="/static/admin/js/ajaxfileupload.js?t=1"></script>

<script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="/static/ueditor/lang/zh-cn/zh-cn.js"></script>


 
<section class="topBanners">
         <div class="icon"></div>
         <div class="topBannersNav">
        <span data-url="/admin/feedback/lists" onclick="ContentLoadGo('/admin/feedback/lists')">用户留言</span>
         >
         <span data-url="/admin/feedback/reply"  onclick="ContentLoadGo('/admin/feedback/reply?pid=<?php echo $pid; ?>')"  >回复</span>
         
         </div>
      </section>
 <section id="zc_detail">

      
  
   <table class="ordertable" style="width:100%;" border="0" cellspacing="0" cellpadding="0">


 
   
     
      <tr>
         <td><div align="right">内容</div></td>
         <td colspan="7">
            <textarea name="e-desc" id="e-desc" cols="60" rows="2" style="margin-top:2px;"></textarea>
            <div style="font-size:14px;color:red;">提示：不能够超过200个字</div>
         </td>
      </tr>
      
     <tr>
       <td style="height:50px;text-align:center;" colspan="2">
			<input type="button" power="70000"  style="width:80px;margin-top:4px;margin-bottom:4px;padding:0px;" value="回复" class="link_btn add"/>
    
       </td>
     </tr>
     
     
   </table>
      
<table class="table" style="margin-top:10px;">

<tr>

<th style="width:100px;">回复时间</th>

<th style="width:100px;">回复人</th>

<th style="width:500px;">内容</th>

<th style="width:100px;">操作</th>
</tr>

<?php 

foreach($lists['data'] as $key=>$val)
{
?>
<tr data-id="<?php echo $val['id']; ?>">

<td>
<?php echo $val['ctime']; ?>
</td>
<td><?php echo $val['name']; ?></td>

<td style="overflow:hidden;">
<div class="mypointer" data-toggle="tooltip"
        data-placement="bottom" title="<?php echo $val['conts']; ?>"><?php echo $val['conts']; ?></div>

</td>

<td style="text-align:right;">


<input type="button" power="30400" value="删除" style="padding:0px 6px;" class="link_btn del"/>

</td>
</tr>
      <?php
      }
	  ?>
</table>
{include file="../application/admin/view/layout/page_tpl_new_go.html" /}

     
     </section>
     
    
       <script type="text/javascript">
     
      function myResearch(){
		   var url="/admin/feedback/reply";
		  
		   var param={
				 pid:<?php echo $pid; ?>
		   };
		   ContentGet(url,param);
	   }
    
      
           $(function(){
        	   var gnum=0;
        	   var lastObj;
        	   //设置搜索栏
        	   $(".research").click(function(){
        		   var page =$(this).attr("page");
        		   $("#cpage").val(page);
        		   myResearch();
        		   
        	   });
        	   
        	   $(".research1").click(function(){
        		   var page =$(this).attr("page");
        		   $("#cpage").val(page);
        		   ContentLoadGo("/admin/feedback/reply?pid=<?php echo $pid; ?>&page="+page);
        		   
        	   });
        	   
			
          	//编辑项
          	    $(".add").unbind().bind("click",function(){
          	    	
          	     var that =this;
           		 var url="/admin/feedback/reply";
           		
           		 var conts=$("#e-desc").val();
           		
        		
        		
        		
        		
        		
        		if(conts=="")
         		{
         			ErrTiShi("内容不能够为空");return false;
         		}
        		
        		
        		
        		var param={
            		    pid:<?php echo $pid; ?>,
            		    
            		    conts:conts,
    				    sys_opt:'addData'//后台判断编辑操作
    		        };
           		//alert(JSON.stringify(param));return false;
           		    
        			 AjaxRequest(url,param,function(data){
          			   if(data.err==0)
          			   {
          				   SuccessTiShi("操作成功");
          				  
          				 ContentLoadGo("/admin/feedback/reply?pid=<?php echo $pid; ?>");
          			   }
          			   else
          			   {
          				   ErrTiShi(data.msg);
          			   }
          		   	});
          			
          	   });
        	   
          	 
          	  $(".del").unbind().bind("click",function(){
       		   var that =this;
       		   var url="/admin/feedback/delReplyData";
       		   var id=$(that).parent().parent().attr('data-id');
       		   var param={
       				   id:id
       		   };
       		   cofirmsss_tishi(1,'您确定要删除吗?',function(id){
       			 
       			   AjaxRequest(url,param,function(data){
           			   if(data.err==0)
           			   {
           				   SuccessTiShi("操作成功");
           				   
           				 
           				 ContentLoadGo("/admin/feedback/reply?pid=<?php echo $pid; ?>");
           			   }
           			   else
           			   {
           				   ErrTiShi("操作失败");
           			   }
           		   });
       			   
       		   });
       	   });
       	   
        
        	 
  			   //全选
  		
  				$("#all").click(function(){   
			    	if(this.checked){   
			        	$(".checkBoxInput").attr("checked", true);  
			        	$(".checkBoxInput").prop("checked", true);  
			    	}else{   
						$(".checkBoxInput").attr("checked", false);
						$(".checkBoxInput").prop("checked", false);
			    	}   
			    	var se=getAllSelectItem();
			    	//console.log(se);
			 	}); 
  				 //导航
         	   $(".topBannerItem").click(function(){
         		   
         		   var attArr = $(this).attr();
             	   goToSelfLink(attArr);
             	   
         			
         	   });
  			   
  				 $(".firstTypeR").change(function(){
    				   
    				   var url="/admin/devlist/selectTypeChange";
    		   		    var id=$(this).val();
    		   		   
    		   		    var param={
    		   				   id:id
    		   				   
    		   		    };
    				   AjaxRequest(url,param,function(data){
    		  			   if(data.err==0)
    		  			   {
    		  				   var html='<option value="">--选择--</option>';
    		  				   $.each(data.data,function(i,v){
    		  					 html +='<option value="'+v.id+'">'+v.dname+'</option>'
    		  				   })
    		  				   $(".secondTypeR").html(html);
    		  			   }
    		  			   else
    		  			   {
    		  				   ErrTiShi("操作失败");
    		  			   }
    		  		   	});
    				   
    			   });
  			
           });
           
	  </script>
	  	  
	  {/block}
	  